package string;
/*
      形参为下标index
      返回值为char类型
      11111
      */

public class ChatAtDemo {
    public static void main(String[] args) {
        String str = "thinking in Java";
        char c = str.charAt(2);
        System.out.println(c);
      /*源码
      public char charAt(int index) {
            if ((index < 0) || (index >= value.length)) {
                throw new StringIndexOutOfBoundsException(index);
            }
            return value[index];
        }
        */
    }
}
